﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="my_ecrm2.aspx.cs" Inherits="my_ecrm2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>我的名片夹</title>
    <link href="./css/ecrm03.css" rel="stylesheet" type="text/css" />
    
    <style type="text/css">
        .hd{background-color:#a9a9a9;}
        .odd {background-color:#ffc;}
        .even {background-color:#cef;}
    </style>	<style type="text/css">
		.newcard{
		    width:400px;
			font-size: 10pt;
		}
		
		.line01{
		    border-bottom: gray 1px solid;
		    vertical-align: bottom;
		}
		.line02{
		    border-bottom: gray 1px dashed;
		}
		.line03{
		   border-right: gray 1px dashed;
		}
		.namebgcolor{
		    background-color: #ff9900; 
		    border-top-style: none; 
		    border-bottom: none; 
		    border-right-style: none; 
		    border-left-style: none;
		    vertical-align: bottom; 
		    text-indent: 6pt; 
		    letter-spacing: 0.4pc; 
		    text-align: left;
		    padding-top: 10px;
		    font-weight: bold; 
		    font-size: 10pt;
		}
	</style>
	<link rel="stylesheet" href="./jquery/css/demo.css" />
    <script type="text/javascript" src="./jquery/autocomplete/lib/jquery.js"></script>

	<script type="text/javascript" src="./jquery/lib/chili-1.7.pack.js"></script>
	<script type="text/javascript" src="./jquery/lib/jquery.easing.js"></script>
	<script type="text/javascript" src="./jquery/lib/jquery.dimensions.js"></script>
	<script type="text/javascript" src="./jquery/jquery.accordion.js"></script>
	
    <script type='text/javascript' src='./jquery/autocomplete/lib/jquery.bgiframe.min.js'></script>
    <script type='text/javascript' src='./jquery/autocomplete/lib/jquery.ajaxQueue.js'></script>
    <script type='text/javascript' src='./jquery/autocomplete/lib/thickbox-compressed.js'></script>
    <link rel="stylesheet" type="text/css" href="./jquery/autocomplete/lib/thickbox.css" />
    <script type='text/javascript' src='./jquery/autocomplete/jquery.autocomplete.js'></script>    <link rel="stylesheet" type="text/css" href="./jquery/autocomplete/jquery.autocomplete.css" />
	
    <script type="text/javascript" src="./js/Function.js"></script>
    <script type="text/javascript" src="./js/myCheck.js"></script>
    <script type="text/javascript" language="javascript">
        function chk()
        {
			if(CheckText(form1.ne_linkman,"姓名",20)==false) return false;
			if(CheckText(form1.ne_companyabb,"公司简称",50)==false) return false;
			if(CheckText(form1.ne_company,"公司全称",50)==false) return false;
			if(CheckText(form1.ne_dept,"部门",20)==false) return false;
			if(CheckText(form1.ne_jobposi,"职位",20)==false) return false;
			if(CheckText(form1.ne_mobile,"手机",100)==false) return false;
			if(CheckText(form1.ne_tel,"固定电话",100)==false) return false;
			if(CheckEMail(form1.ne_email)==false) return false;
			if(CheckText(form1.ne_companyaddr,"公司地址",200)==false) return false;
			if(CheckText(form1.ne_companypostcode,"邮编",10)==false) return false;

	        if(($("#ne_unittype").val()=="A0102")||($("#ne_unittype").val()=="A0103") )
	        {
	            if(CheckText(form1.ne_srvcompany,"服务的公司",50)==false) return false;
	        }
	        else
	        {
	            if(CheckTextL(form1.ne_srvcompany,"服务的公司",50)==false) return false;
	        }
            
			if(CheckTextL(form1.ne_age,"年龄",20)==false) return false;
			if(CheckTextL(form1.ne_birthday,"生日",50)==false) return false;
			if(CheckTextL(form1.ne_fax,"传真",50)==false) return false;
			if(CheckTextL(form1.ne_favr,"个人爱好",300)==false) return false;
			if(CheckTextL(form1.ne_notice,"其它说明",300)==false) return false;
            
			return true;
        }
        
        function goback()
        {
            window.location.href="my_ecrm.aspx";
        }
	    function GetNameList()	    {	        $.ajax({	            url:'./ajax/companyabbs.ashx',	            type:'get',	            dataType:'html',	            timeout:1000,	            success: function(msg)	            {	                eval("var companylist=["+msg+"]");	                $("#ne_companyabb").autocomplete(companylist);	                $("#ne_company").autocomplete(companylist);	                $("#ne_srvcompany").autocomplete(companylist);	            }	        });	    };
	    function togglesrv()
	    {
	        if(($("#ne_unittype").val()=="A0102")||($("#ne_unittype").val()=="A0103") )
	        {
	            $("#srvinput").fadeIn('fast');
	        }
	        else
	        {
	            $("#srvinput").fadeOut('fast');
	        }
	    }
	    $(document).ready(function(){            togglesrv();	        GetNameList();	    });	        </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table width="96%" border="0" cellpadding="0" cellspacing="0" align="center">
            <tr>
                <td style="font-weight: bold; font-size: 10pt;">
                    <div id="nav"><a href="index.aspx"><span>首页</span></a><a class="now" href="my_ecrm.aspx"><span>我的名片夹</span></a><a href="my_givelist.aspx"><span>我的赠刊名录</span></a><a href="my_plan.aspx"><span>我的周计划</span></a><a href="easybbs.aspx"><span>员工交流区</span></a><a href="employee2.aspx"><span>员工联系表</span></a></div>
                    <div class="clear"></div><div id="status"><div id="subnav"></div><span class="pl"><asp:Literal ID="userstatus1" runat="server"></asp:Literal><asp:Literal ID="userstatus2" runat="server"></asp:Literal></span></div>
                     <h1><asp:Literal ID="infoname" runat="server"></asp:Literal>(<asp:Literal ID="infoid" runat="server"></asp:Literal>)&nbsp;&nbsp;<span onclick="javascript:goback()" style="cursor: hand; font-size: 10pt; color: dimgray;">[返回]</span></h1>
                     <p style="margin-left: 20px;">
                        <table border=0 cellpadding=2 cellspacing=2 width="95%">
                            <tr>
                                <td align="left"><div style="font-size: 11pt; color: #666666;">&gt;&gt;共有<asp:Literal ID="ltcount" runat="server"></asp:Literal>人</div></td>
                                <td align="left"><div>按姓名找人：<asp:TextBox ID="txtName" runat="server" Width="100px"></asp:TextBox><asp:Button ID="btnFind" runat="server" Text="搜索" OnClick="btnFind_Click" /></div></td>
                            </tr>
                        </table>
                        
                        <table border="0" cellpadding="0" cellspacing="0" width="95%">
                            <tr>
                                <td colspan="2" style="border-bottom: darkgray 1px dashed;"></td>
                            </tr>
                            <tr>
                                <td valign="top" width="500">
					                <div style="margin-top: 10px; margin-left: 20px;">
					                    <asp:datalist id="dlRS" runat="server" Width="98%" OnItemCommand="dlRS_ItemCommand">
                                            <AlternatingItemStyle BackColor="White" />
                                            <ItemStyle BackColor="WhiteSmoke" />
							                <HeaderTemplate>
							                </HeaderTemplate>
							                <ItemTemplate>
								                <table cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
								                    <TR height=26>
									                    <td width=30><%# Container.ItemIndex + 1 %></td>
									                    <TD align="left" width="60"><asp:linkbutton id="lbModify" runat="server" CommandName="modify" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "uid") %>'><%#  DataBinder.Eval(Container.DataItem, "linkman") %></asp:linkbutton></TD>
									                    <td align="center" width="40"><%# DataBinder.Eval(Container.DataItem, "sex") %></td>
									                    <td align="left"><%# DataBinder.Eval(Container.DataItem, "companyabb") %></td>
									                    <TD align="center" width="40"><asp:linkbutton id="lbRemove" runat="server" CommandName="remove" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "uid") %>'><span onClick="javascript:{return confirm('删除操作不可恢复，确认吗？');}">删除</span></asp:linkbutton></TD>
								                    </TR>
		                                        </table>
							                </ItemTemplate>
							                <FooterTemplate>
		                                    </FooterTemplate>
		                                </asp:datalist>
		                            </div>
                                </td>
                                <td style="border-left: darkgray 1px dashed;" valign="top">
                                    <div style="margin-top: 10px; margin-left: 20px;">
                                        <div id="newcard" class="newcard">
                                            <div class="line01"><asp:TextBox ID="ne_linkman" runat="server" Width="90" CssClass="namebgcolor" Height="22">姓名</asp:TextBox><font color="red">*</font></div>
                                            <div class="line02">
                                                <table border=0 cellpadding=4 cellspacing=0 width=97% align="center">
                                                    <tr height=30>
                                                        <td width=45% class="line03">性别：<asp:RadioButton ID="ne_male" runat="server" Text="先生" GroupName="sexrb" Checked="true" /><asp:RadioButton ID="ne_female" runat="server" Text="女士" GroupName="sexrb" /></td>
                                                        <td width=55%>&nbsp;&nbsp;重要级别：<asp:DropDownList ID="ne_implevel" runat="server">
                                                            <asp:ListItem Selected="True" Value="1">VIP</asp:ListItem>
                                                            <asp:ListItem Value="2">重要</asp:ListItem>
                                                            <asp:ListItem Value="3">一般</asp:ListItem>
                                                        </asp:DropDownList><font color="red">*</font></td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="line01">
                                                <table border=0 cellpadding=4 cellspacing=0 width=97% align="center">
                                                    <tr height=30>
                                                        <td width=45%  class="line03">邮件：<asp:TextBox ID="ne_email" runat="server" Width="121px"></asp:TextBox><font color="red">*</font></td>
                                                        <td width=55%>&nbsp;&nbsp;<span id="srvinput" style="color: #003399; vertical-align: bottom;">服务客户：<asp:TextBox ID="ne_srvcompany" runat="server" Width="130"></asp:TextBox><font color="red">*</font></span></td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="line02">
                                                <table border=0 cellpadding=4 cellspacing=0 width=97% align="center">
                                                    <tr height=30>
                                                        <td width=45% class="line03">手机：<asp:TextBox ID="ne_mobile" runat="server" Width="120px"></asp:TextBox><font color="red">*</font></td>
                                                        <td width=55%>&nbsp;&nbsp;固定电话：<asp:TextBox ID="ne_tel" runat="server" Width="130px"></asp:TextBox><font color="red">*</font></td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="line02">
                                                <table border=0 cellpadding=4 cellspacing=0 width=97% align="center">
                                                    <tr height=30>
                                                        <td>公司：<asp:TextBox ID="ne_company" runat="server" Width="335px"></asp:TextBox><font color="red">*</font></td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="line02">
                                                <table border=0 cellpadding=4 cellspacing=0 width=97% align="center">
                                                    <tr height=30>
                                                        <td>简称：<asp:TextBox ID="ne_companyabb" runat="server" Width="335px"></asp:TextBox><font color="red">*</font></td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="line02">
                                                <table border=0 cellpadding=4 cellspacing=0 width=97% align="center">
                                                    <tr height=30>
                                                        <td width=45% class="line03">年龄：<asp:TextBox ID="ne_age" runat="server" Width="120px"></asp:TextBox></td>
                                                        <td width=55%>&nbsp;&nbsp;所在部门：<asp:TextBox ID="ne_dept" runat="server" Width="130"></asp:TextBox><font color="red">*</font></td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="line01">
                                                <table border=0 cellpadding=4 cellspacing=0 width=97% align="center">
                                                    <tr height=30>
                                                        <td width=45%  class="line03">生日：<asp:TextBox ID="ne_birthday" runat="server" Width="120px"></asp:TextBox></td>
                                                        <td width=55%>&nbsp;&nbsp;所在职位：<asp:TextBox ID="ne_jobposi" runat="server" Width="130"></asp:TextBox><font color="red">*</font></td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="line02">
                                                <table border=0 cellpadding=4 cellspacing=0 width=97% align="center">
                                                    <tr height=30>
                                                        <td>地址：<asp:TextBox ID="ne_companyaddr" runat="server" Width="335px"></asp:TextBox><font color="red">*</font></td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="line01">
                                                <table border=0 cellpadding=4 cellspacing=0 width=97% align="center">
                                                    <tr height=30>
                                                       <td width=45%  class="line03">传真：<asp:TextBox ID="ne_fax" runat="server" Width="120px"></asp:TextBox></td>
                                                       <td width=55%>&nbsp;&nbsp;邮政编码：<asp:TextBox ID="ne_companypostcode" runat="server" Width="130"></asp:TextBox><font color="red">*</font></td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="line02">
                                                <table border=0 cellpadding=4 cellspacing=0 width=97% align="center">
                                                    <tr height=30>
                                                        <td>爱好：<asp:TextBox ID="ne_favr" runat="server" Width="335px"></asp:TextBox></td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="line01">
                                                <table border=0 cellpadding=4 cellspacing=0 width=97% align="center">
                                                    <tr height=30>
                                                        <td>备注：<asp:TextBox ID="ne_notice" runat="server" Width="335px"></asp:TextBox></td>
                                                    </tr>
                                                     <tr>
                                                        <td>（IM帐号，如 MSN / QQ / yahoo...等）</td>
                                                    </tr>
                                               </table>
                                            </div>
                                        </div>
                                        <table border="0" cellpadding="4" cellspacing="4">
                                            <tr>
                                                <td></td><td><asp:Button ID="btnNew" runat="server" Text="增加此人" OnClick="btnNew_Click" /><asp:Button ID="btnEdit" runat="server" Text="保存修改" OnClick="btnEdit_Click" /></td>
                                            </tr>
                                        </table>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    <div style="border-bottom: darkgray 1px solid;"></div>
                    <span class="bottomfont">SEEC&copy;2008-2009 汽车中国</span>
                </td>
            </tr>
        </table>
	    <div id="myhidediv" style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; VISIBILITY: hidden; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; HEIGHT: 1px"><asp:TextBox id="uid" runat="server"></asp:TextBox><asp:TextBox id="ne_unittype" runat="server"></asp:TextBox></div>
    </div>
    </form>
</body>
</html>
